Show:

Streams photoSelector Class

Interface for selecting facebook photos from user albums

Constructor

Streams photoSelector

(
  • [options]
  • [$options.fetchBy='album']
  • [$options.preprocessAlbums]
  • [$options.preprocessPhotos]
)

Parameters:

  • [options] Object optional

    this object contains function parameters

    • [onSelect] Q.Event optional

      Triggered when the user selects a photo.

    • [beforePhotos] Q.Event optional

      Triggered when photos are about to be rendered.

    • [onPhotos] Q.Event optional

      Triggered when photos have been rendered.

    • [onPhotosLoaded] Q.Event optional

      Triggered when the photos have all been loaded.

    • [uid='me'] String optional

      Optional. The uid of the user on the platform whose photos are shown. Facebook only allows 'me' or a page id as a value.

    • [onLoad] Q.Event optional

      Q.Event, callback or callback string name which is called when bunch of photos has been loaded.

    • [onError] Q.Event optional

      Q.Event, callback or callback string which will be called for each image that is unable to load. Image DOM element will be passed as first argument.

    • [platform='facebook] String optional

      Has to be "facebook" for now.

    • [prompt=false] String optional

      Specifies type of prompt if user is not logged in or didn't give required permission for the tool. Can be either 'button', 'dialog' or null|false. In first case just shows simple button which opens facebook login popup. In second case shows Users.facebookDialog prompting user to login. In third case will not show any prompt and will just hide the tool.

    • [promptTitle] String optional

      Used only when 'prompt' equals 'dialog' - will be title of the dialog.

    • [promptText] String optional

      Used either for button caption when 'prompt' equals 'button' or dialog text when 'prompt' equals 'dialog'.

    • [oneLine] Boolean optional

      If true, all the images are shown in a large horizontally scrolling line.

    • [cache] Boolean optional

      If true, photos will be cached using localStorage (if available).

  • [$options.fetchBy='album'] String optional

    The tool supports different algoriths for fetching photos. Can be either by 'album' or 'tags'. Maybe more will be added later.

  • [$options.preprocessAlbums] String optional

    Optional function to process the albums array before presenting it in the select. Receives a reference to the albums array as the first parameter, and a callback to call when it's done as the second.

  • [$options.preprocessPhotos] String optional

    Optional function to process the photos array before presenting it in the select. Receives a reference to the albums array as the first parameter, and a callback to call when it's done as the second.

Item Index